using System.Windows.Forms;
using pub.CmdUI.Cmd;
using pub.CmdUI.UI.Control;

namespace todo.Cmd.Edit.Clipboard
{
    public class CutCmd : CopyCmd
    {
        public CutCmd()
        {
            Shortcut = new CmdShortcut(Keys.Control | Keys.X);
        }

        public override void Execute(IControlUI controlUi)
        {
            base.Execute(controlUi);
            if (TodoApi.Instance.IsEditing() ?? false)
            {
                TodoApi.Instance.PasteText("");
                return;
            }
            TodoApi.Instance.Delete();
        }
    }
}